package com.wang.springcloudconfigclient.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author wly
 * @Date 2018/7/2 11:35
 */
@RestController
public class HelloController {
    @Autowired
    private Environment env;

    @RequestMapping("/test")
    public String test() {
        return env.getProperty("local.ip") + "," + env.getProperty("local.port");
    }
}
